package com.cai.ex;

import com.cai.common.result.StatusCode;
import lombok.Data;

/**
 * @Title: ServiceException
 * @Author RuoLi
 * @Package com.cai.ex
 * @Date 2024/1/12 10:44
 * @description: 自定义业务异常
 */
public class ServiceException extends RuntimeException {
    public ServiceException(StatusCode code) {
        super(code.getMessage());
    }

    public ServiceException() {
        super();
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    protected ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
